// Copyright (C) 2025 Focus Media Holding Ltd. All Rights Reserved.

package cn.pacerx.running.db.domain;

import java.time.LocalDate;
import java.time.LocalDateTime;

import org.apache.ibatis.type.EnumTypeHandler;

import cn.pacerx.running.db.enums.RepeatTypeEnum;
import io.mybatis.provider.Entity;
import lombok.Data;

/**
 * Event
 *
 * @author zhanglingwei@focusmedia.cn
 * @since 2025-06-05
 */
@Data
@Entity.Table("event")
public class Event {
    @Entity.Column(id = true, useGeneratedKeys = true, insertable = false, updatable = false)
    private Long id;

    private Long userId;

    private String title;

    private LocalDate targetDate;

    @Entity.Column(typeHandler = EnumTypeHandler.class)
    private RepeatTypeEnum repeatType;

    private Boolean hasStartDate;

    private String remark;

    private Boolean status;

    @Entity.Column(updatable = false, insertable = false)
    private LocalDateTime addTime;

    @Entity.Column(updatable = false, insertable = false)
    private LocalDateTime updateTime;
}
